# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=peony
pkgver=3.2.3
pkgrel=2
pkgdesc="File manager for the UKUI desktop"
arch=('loong64' 'x86_64')
license=('GPL')
url="https://github.com/ukui/peony"
depends=('gsettings-qt' 'kwayland5' 'kwindowsystem5' 'libcanberra' 'libnotify' 'poppler-qt5'
         'qt5-ukui-platformtheme' 'qt5-x11extras' 'udisks2')
makedepends=('qt5-tools')
groups=('ukui')
source=("https://github.com/ukui/peony/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('352e533538ed900f4e38f06634f9a2709161f6b0b27f66765ddf0b97abea6c72289465688065511cf667bacd5f325be0a1e0fda49ece213f4aefaf181285a7d0')

build() {
  cd peony-$pkgver
  qmake-qt5
  make
}

package() {
  cd peony-$pkgver
  make INSTALL_ROOT="$pkgdir" install

  install -Dm644 data/peony{,-computer,-home,-trash}.desktop -t "$pkgdir"/usr/share/applications/
  install -Dm644 data/peony-desktop.desktop -t "$pkgdir"/etc/xdg/autostart/
}
